﻿using DataManagementBoard.Model;
using DataManagementBoard.Model.Provider;
using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataManagementBoard
{
    /// <summary>
    /// 全局数据类
    /// </summary>
    public class AppData:ViewModelBase
    {
        public AppData()
        {
            roleModels = new List<RoleModel>();
            roleModels.Add(new RoleModel { Id = 0, Name = "管理员" });
            roleModels.Add(new RoleModel { Id = 1, Name = "用户" });
        }

        private UserInfo userInfo = new UserInfo() { Name="admin",Password="0"};

        public UserInfo CurrentUser
        {
            get { return userInfo; }
            set { userInfo = value; }
        }

        

        private List<RoleModel> roleModels;
        public List<RoleModel> RoleModels
        {
            get { return roleModels; }
            set { roleModels = value; }
        }

    }
}
